package com.yanqu.road.entity.activity.gourdchild;

import java.util.ArrayList;
import java.util.List;

public class Grid {

    List<GridData> data = new ArrayList<>();

    public List<GridData> getData() {
        return data;
    }

    public void setData(List<GridData> data) {
        this.data = data;
    }

    public Grid clone(){
        Grid grid = new Grid();
        List<GridData> list = new ArrayList<>();
        for (GridData datum : data) {
            list.add(datum.clone());
        }
        grid.setData(list);
        return grid;
    }

    public Grid emptyGrid(){
        return new Grid();
    }

    public boolean empty(){
        return data.size() == 0;
    }
}
